import http from "../../utils/requestAI";
import type { addPrems } from "./type";
import {type ExampleGenerate,type Data } from "./type";



//列表
export const getCompanys=(params?:Data)=>{

  return  http.get<ExampleGenerate>('/purchase/list',params);

}

//删除
export const delCompany=(id:number)=>{

    console.log('删除1111',id);

    return  http.delete(`/purchase/delete/${id}`);
  
}

// export const delCompanys=(ids:number[])=>{

//     console.log('删除222',ids);
//     return  http.post(`/company/deleteAll/`,ids);
  
// }

export const addCompany = (data: addPrems) => {
  return http.post(`/purchase/add`, data);
}